package com.app.web.order.job;

import com.app.base.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Description
 * Created by 王伟
 * Date create on 15:32 2019/12/12.
 */
public interface OrderAnalyDao extends BaseDao {

    //获取订单列表
    List<Map<String,Object>> getGoodsOrderListByRecord(@Param("record")long record);

    //获取预估订单收益明细
    int getUserMoneyDetailExpect(String order_sn);

    //订单分佣明细表
    int addUserMoneyDetail(Map<String, Object> map);

    /* 订单分佣数据 */
    List<Map<String,Object>> getOrderExpectList(@Param("record")long record);

    /* 更新用户各阶段佣金 */
    int updateUserAnalyMoney(Map<String, Object> map);

    //根据状态查询订单
    List<Map<String, Object>> getOrderByStatus(@Param("record")long record,@Param("type")int type);

    //更新已经失效的金额  预估金额
    int updateInvalidMoney(Map<String, Object> paramMap);

    //查询用户可提现金额数据
    List<Map<String, Object>> getUserMoneyWithdrawalExpect(Map<String, Object> paramMap);

    // 累加用户已经结算的余额
    int accumulationUserMoney(Map<String, Object> map);

    //根据订单关联查询分佣明细固化数据
    List<Map<String,Object>> getOrderPromotionExpectList(@Param("record")long record);
    int addOrderExpect(Map<String,Object> paramMap);
    int changeOrderExpectStatus(@Param("status") int status,@Param("sns") List<String> sns);

    //获取预估订单收益明细列表 根据ID记录值
    List<Map<String,Object>> getUserMoneyDetailExpectList(Map<String, Object> orderParamMap);
    //获取失效订单预估收益明细列表  根据ID记录值
    List<Map<String,Object>> getUserMoneyDetailInvalidExpectList(Map<String, Object> orderParamMap);
    //更新用户每天订单
    int analyOrderCount(Map<String, Object> paramMap);
}
